package vivek.project.pocketmoney.investments.scripts
{
	import flash.data.*;
	import flash.errors.*;

	public class PropertySQLScript
	{
		public static const ADD_NEW_PROPERTY:String="INSERT INTO propertydetails (pd_propertyname,pd_developer,pd_remark,pd_size,pd_rate,pd_othercharges)" + "VALUES (:pd_propertyname,:pd_developer,:pd_remark,:pd_size,:pd_rate,:pd_othercharges)";
		public static const ADD_NEW_PROPERTY_TRANSACTION:String="INSERT INTO propertypaymentdetails (pp_propertyid,pp_accountid,pp_paymentdate,pp_amount,pp_paymenttype,pp_transactionid ,pp_remarks,pp_txntype,pp_instru,pp_userid) VALUES " + "(:pp_propertyid,:pp_accountid,:pp_paymentdate,:pp_amount,:pp_paymenttype,:pp_transactionid,:pp_remarks,:pp_txntype,:pp_instru,:USER_ID)";
		public static const DELETE_PROPERTY:String="DELETE FROM PROPERTYDETAILS WHERE PD_PROPERTYID=:pd_propertyid";
		public static const DELETE_PROPERTY_PAYMENT:String="delete from PROPERTYPAYMENTDETAILS where :PP_TRANSACTIONID=PP_TRANSACTIONID";
		public static const DELETE_PROPERTY_TRANSACTION:String="UPDATE fixedincomemanager SET fm_type=:fm_type,fm_accountid=:fm_accountid,fm_channelid=:fm_channelid,fm_investmentdate=:fm_investmentdate,fm_investmentamount=:fm_investmentamount, fm_investmentname=:fm_investmentname,fm_comments=:fm_comments,fm_percent=:fm_percent,fm_maturityamount=:fm_maturityamount,fm_investperiod=:fm_investperiod,fm_status=:fm_status,fm_maturitydate=:fm_maturitydate WHERE fm_investmentid=:fm_investmentid ";
		public static const GET_ALL_PROPERTY:String="SELECT * FROM propertydetails order by pd_propertyid";
		public static const GET_ALL_PROPERTY_TRANSACTIONS:String="SELECT * FROM propertypaymentdetails,accountmanager,propertydetails where pp_accountid = am_accountid and pp_propertyid = pd_propertyid ORDER BY pp_paymentdate";
		public static const UPDATE_PROPERTY_DETAILS:String="UPDATE propertydetails set pd_propertyname=:pd_propertyname,pd_developer=:pd_developer,pd_remark=:pd_remark,pd_size=:pd_size,pd_rate=:pd_rate,pd_othercharges=:pd_othercharges WHERE pd_propertyid = :pd_propertyid";
		public static const UPDATE_PROPERTY_PAYMENT_DETAILS:String="UPDATE propertypaymentdetails set pp_propertyid=:pp_propertyid,pp_accountid=:pp_accountid,pp_paymentdate=:pp_paymentdate,pp_amount=:pp_amount,pp_paymenttype=:pp_paymenttype,pp_remarks=:pp_remarks,pp_instru=:pp_instru,pp_txntype=:pp_txntype WHERE pd_id = :pd_id";
		public static const UPDATE_PROPERTY_TRANSACTION:String="UPDATE bullionmanager set bm_type= :bm_type,bm_accountid=:bm_accountid,bm_channelid=:bm_channelid,bm_transactiontype=:bm_transactiontype,bm_transactiondate=:bm_transactiondate,bm_quantity=:bm_quantity,bm_costper10g=:bm_costper10g,bm_othercharges=:bm_othercharges,bm_remarks =:bm_remarks WHERE bm_id = :bm_id";
	}
}